/* 
 * File:   osmPathBuilder.h
 * Author: kenji
 *
 * Created on January 22, 2014, 8:26 PM
 */



#ifndef OSMPATHBUILDER_H
#define	OSMPATHBUILDER_H

#define OSMIUM_WITH_PBF_INPUT
#define OSMIUM_WITH_XML_INPUT
#define REQUEST_FILENAME "request.osm"
#define COORD_VARIATION 0.05

#include <osmium.hpp>
#include "graph.h"
#include "dijkstra.h"
#include <cstdio>
#include <stdio.h>
#include <fstream>
#include <curl/curl.h>
#include <curl/easy.h>
#include <cstdlib>
#include <string.h>
#include <sstream>
#include <vector>
#include "osmium/osmfile.hpp"
#include "osmium/input.hpp"
#include <cstdarg>
#include <stdlib.h>
#include "storagehandler.h"

class OsmPathBuilder {
public:

    OsmPathBuilder(double lat,double lon);

    ~OsmPathBuilder();

    std::vector<int> buildShortestPath(int begin, int end, std::vector<int> avoidPoints);

private:

    void fillTheGraph();

    void downloadFile(const char* url);

    void getRequest(double lat, double lon);

    Graph * graph_;

    DijkstraAlgorithm* dijstraAlg_;
};

#endif	/* OSMPATHBUILDER_H */

